<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>登录页面</title>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<link rel="stylesheet" type="text/css"
			href="<%=basePath%>skins/themes/default/easyui.css" />
		<link rel="stylesheet" type="text/css"
			href="<%=basePath%>skins/themes/icon.css" />
		<link rel="stylesheet" type="text/css"
			href="<%=basePath%>skins/themes/demo.css" />
		<script type="text/javascript"
			src="<%=basePath%>skins/jquery-1.7.2.min.js">
</script>
		<script type="text/javascript"
			src="<%=basePath%>skins/jquery.easyui.min.js">
</script>
		<script type="text/javascript" src="<%=basePath%>skins/utils.js">
</script>
		<script type="text/javascript">
function login() {
	$('#loginPanel').form('submit', {
		url : '<%=basePath%>member/login.action',
		onSubmit : function() {
			var flag = $(this).form('validate');
			if (flag) {
				showProcess(true, '温馨提示', '正在提交数据...');
			}
			return flag;
		},
		success : function(result) {
			showProcess(false);
			var result = eval('(' + result + ')');
			if (result.success === true) {
				$.messager.alert('温馨提示', result.message);
				window.location.href = '<%=basePath%>common/home.action';
			} else {
				$.messager.alert('温馨提示', result.message);
			}
		},
		onLoadError : function() {
			showProcess(false);
			$.messager.alert('温馨提示', '由于网络或服务器太忙，提交失败，请重试！');
		}
	});
}
function cancel() {
	$(":text").val('');
	$(":password").val('');
}
</script>
	</head>
	<body>
		<div id="loginWin" class="easyui-window"
			data-options="title:'登录窗口',iconCls:'icon-save',maximizable:false,closed:false,closable:false,minimizable:false"
			style="width: 300px; height: 200px; padding: 5px;">
			<div class="easyui-layout" data-options="fit:true">
				<form id="loginPanel" method="post">
					<div data-options="region:'center',border:false"
						style="padding: 10px; background: #fff; border: 1px solid #ccc;">
						<label for="txtMemberName">
							登录用户：
						</label>
						<input id="txtMemberName" name="member.memberLoginName"
							type="text" class="easyui-validatebox"
							data-options="required:true,missingMessage:'请输入登录用户...'" />
						<br />
						<label for="txtMemberPassword">
							登录密码：
						</label>
						<input id="txtMemberPassword" name="member.memberPassword"
							type="password" class="easyui-validatebox"
							data-options="required:true,missingMessage:'请输入登录密码...'" />
					</div>
					<div data-options="region:'south',border:false"
						style="text-align: right; padding: 5px 0;">
						<a class="easyui-linkbutton" data-options="iconCls:'icon-ok'"
							href="javascript:void(0)" onclick="login()"> 登 录 </a>
						<a class="easyui-linkbutton" data-options="iconCls:'icon-cancel'"
							href="javascript:void(0)" onclick="cancel()"> 取 消 </a>
					</div>
				</form>
			</div>
		</div>
	</body>
</html>
